#include "mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    QMenuBar* bar = new QMenuBar();
    this->setMenuBar(bar);

    QMenu* menu = new QMenu("Document (&D)");
    QAction* action1 = new QAction("action1(&1)");
    QAction* action2 = new QAction("action2(&2)");
    bar->addMenu(menu);

    menu->addAction(action1);
    menu->addSeparator();
    action1->setIcon(QIcon(":/q.png"));
    menu->addAction(action2);



}

MainWindow::~MainWindow()
{
    delete ui;
}

